import React, { useState } from 'react';
import { Button, Overlay } from 'react-vant';

export default () => {
  const [visible, setVisible] = useState(false);
  return (
    <>
      <Button type="primary" onClick={() => setVisible(true)}>
        兑换
      </Button>
      <Overlay visible={visible} 
        style={{
          height: '100%',
          display: 'flex',
          alignItems: 'center',
          justifyContent: 'center',
        }}>
        <div style={{ width: 300, height: 200, backgroundColor: '#fff', borderRadius: 4,borderRadius:'30rem', }} >
          <p style={{margin:50,fontWeight:'bold'}}>很抱歉，您当前积分不足</p>
          <button style={{ width: 220, height: 50, backgroundColor: 'red', borderRadius: 24 }} onClick={() => setVisible(false)}>确认</button>
        </div>
      </Overlay>
    </>
  );
};